import './App.css';
import Login from "./Login";
import Reg from "./reg"
import {BrowserRouter as Router,Route,Switch,Redirect} from "react-router-dom";
import Home from "./Home";
import PrivateRoute from "../components/PrivateRoute";

// import Commodity from "./../components/CommodityManagement/commodity"
// import Commodityset from "./../components/CommoditySet/commodityset"
// import Customer from "../components/CustomerManagement/customer";
// import Juri from "../components/jurisdiction/juri";
//  import Shouye from "../components/shouye/shouye";
// import Staffset from "../components/StaffSet/staffset";
// import Storeset from "../components/StoreSet/storeset";
// import Suppierset from "../components/SupplierSet/suppierset";
// import Systemset from "../components/SystemSet/systemset";
// import Xgmm from "../components/xgmm/xgmm";
function App() {
    return (
        <Router>
            <div >
                <Switch>
                    <Route path={'/login'} component={Login}></Route>
                    <Route path={'/reg'} component={Reg}></Route>
                    <Route path={'/index'} >
                        <Home>
                            <PrivateRoute></PrivateRoute>
                            {/*<Switch>*/}
                            {/*    <Route path={'/index/shouye'} component={Shouye} ></Route>*/}
                            {/*    {PrivateRoute}*/}
                            {/*    <Redirect to={'/index/shouye'}></Redirect>*/}

                            {/*<Route path={'/index/commodity'} component={Commodity}></Route>*/}
                            {/*<Route path={'/index/commodityset'} component={Commodityset}></Route>*/}
                            {/*<Route path={'/index/customer'} component={Customer}></Route>*/}
                            {/*<Route path={'/index/juri'} component={Juri}></Route>*/}
                            {/*<Route path={'/index/staffset'} component={Staffset}></Route>*/}
                            {/*<Route path={'/index/storeset'} component={Storeset}></Route>*/}
                            {/*<Route path={'/index/suppierset'} component={Suppierset}></Route>*/}
                            {/*<Route path={'/index/systemset'} component={Systemset}></Route>*/}
                            {/*<Route path={'/index/xgmm'} component={Xgmm}></Route>*/}
                            {/*<Redirect to={'/index/shouye'}></Redirect>*/}
                            {/*</Switch>*/}
                        </Home>
                    </Route>
                    <Route path={'/'} exact render={()=><Redirect to='/login'/>}></Route>
                </Switch>
            </div>
        </Router>
    );
}

export default App;

